package com.example.demo1014;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.os.RemoteException;
import android.util.Log;

public class MyService2 extends Service {

    private IMyAidlInterface2.Stub interface2 = new IMyAidlInterface2.Stub() {
        @Override
        public void basicTypes(int anInt, long aLong, boolean aBoolean, float aFloat, double aDouble, String aString) throws RemoteException {

        }

        @Override
        public void sum(int a, int b) throws RemoteException {

            int res = a + b;

            Log.d(TAG, "sum: "+ res);
        }
    };

    private static final String TAG = "MyService2";

    public MyService2() {

        Log.d(TAG, "MyService2: ");
    }

    @Override
    public IBinder onBind(Intent intent) {

        return interface2;
    }
}